import { createStore, StoreCreator } from 'redux'
import reducer from './reducer'

// 配置一些调试工具 redux-logger

const store = createStore(reducer)

console.log('我是仓库数据:',store,  store.getState())

// 注解store中的state ->
// ReturnType 可以将typeof检测出的类型 反向注入 给 RootStore；
export type RootState = ReturnType<typeof store.getState>

export default store;
